<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" href="<%=path%>/resources/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<%=path%>/resources/css/style.css">
	<title>Quora</title>
</head>
<body >
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Quora</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="#">Questions <span class="sr-only">(current)</span></a></li>
        <li><a href="#">Tags</a></li>
        <li><a href="#">Users</a></li>
      </ul>
      <form class="navbar-form navbar-left" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default">Submit</button>
      </form>
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#">Ask Question</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${user.name}<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">My Home page</a></li>
            <li><a href="#">Setup</a></li>
            <li><a href="#">Message</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">Log out</a></li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<div class="tab-panel" style="display: block; margin-bottom:10%;">
  <div data-type="daily">
  <c:forEach items="${questions}" var="q"> 
    <div class="container explore-feed feed-item" data-offset="1">
      <h2><a href="viewquestion?qid=${q.getId()}">${q.title}</a><a class="question_link" target="_blank" href="http://www.zhihu.com/question/37018823/answer/75090340"></a></h2>
      <div tabindex="-1" class="zm-item-answer " data-aid="25459583" data-atoken="75090340" data-collapsed="0" data-created="1449136167" data-deleted="0" data-isowner="0" data-helpful="1" data-copyable="1">
        
        <div class="zm-item-vote">
          <a class="btn btn-info" href="viewquestion?qid=${q.getId()}">${q.getAnswers().size()}</a> 个答案
        </div>


        <div class="answer-head">

          <div class="zm-item-answer-author-info">

            <p><a class="author-link" href="viewuser?userid=${q.getAuthorId()}">${q.authorName} </a>，<span title="提出此问题" class="bio">提出此问题</span></p>
          </div>


        </div>
        <div class="rich-text" style="width: 50%;word-wrap: break-word;">

        


        <div class="zh-summary summary clearfix">
		
          ${q.body}
		
          <a href="viewquestion?qid=${q.getId()}" class="toggle-expand">显示全部</a>

        </div>


      </div>
      <div class="zm-item-meta zm-item-comment-el answer-actions clearfix">
        <div class="zm-meta-panel">

          <a  href="#" onclick="followQ('${q.getId()}','${user.getId()}');" ><i class="z-icon-follow"></i>关注问题</a>

          <a href="#">
          <i class="z-icon-comment"></i>${0} 条评论</a>
        </div>
      </div>
    </div>
  </div>
  <hr>
  </c:forEach> 
</div>
</div>

<footer class="footer navbar-bottom ">
  <!-- Copyright Notice Do Not Remove -->
  <div class="container span7 text-center">
    <a href="http://www.quora.com" target="_blank">Powered by Quora</a><span> @ </span>Copyright 2015 <a href="http://www.maya.com" target="_blank">Maya</a>
  </div>
  <!-- Copyright Notice Do Not Remove -->
</footer>
<script type="text/javascript" src="<%=path%>/resources/js/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/resources/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=path%>/resources/js/script.js"></script>
</body>
</html>